﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    class Program
    {
        static void Main(string[] args)
        {
            Test();
            Test1();
            Test2();
            Console.ReadKey();
        }
        public static void Test() 
        {
            Console.WriteLine("请输入半径:");
            float r = float.Parse(Console.ReadLine());
            const double pi = 3.14;
            Console.WriteLine("面积"+pi*(r*r));
        }
        public static void Test1() 
        {
            Console.WriteLine("请输入四位整数:");
            int a = int.Parse(Console.ReadLine());
            Console.WriteLine("千位是" + a / 1000 % 10);
            Console.WriteLine("百位是" + a / 100 % 10);
            Console.WriteLine("十位是" + a / 10 % 10);
            Console.WriteLine("个位是" + a % 10);
        }
        public static void Test2() 
        {
            Console.WriteLine("请输入第一个数");
            int a = int.Parse(Console.ReadLine());
            Console.WriteLine("请输入第二个数");
            int b = int.Parse(Console.ReadLine());
            Console.WriteLine("请输入第三个数");
            int c = int.Parse(Console.ReadLine());
            if (a>b&&a>c)
            {
                Console.WriteLine("最大数" + a);
               
            }
            else if (b>a&&b>c)
            {
                Console.WriteLine("最大数" + b);
            }
            else if (c > a && c > a)
            {
                Console.WriteLine("最大数" + c);
            }
        }
    }
}
